import React, { useEffect, useState } from 'react'
import logo from './logo.svg'
import Catalogue from '@/components/Catalogue/index'
import { useLocation, useNavigate } from 'react-router-dom'
import { Outlet } from 'react-router-dom'
import { routeList } from '@/router/index'
import { AppBodySty, AppFrameSty, CatalogueFrameSty, ScrollElementSty } from './AppStyle'
import Print from '@/components/Print';
import { Button, Modal } from 'antd'

function App() {
  let navigate = useNavigate();
  useEffect(() => {
    navigate('/home', {
      replace: false,
    })

  }, [])
  return (
    <>
      <AppFrameSty >
        <CatalogueFrameSty>
          <Catalogue routeList={routeList} />
        </CatalogueFrameSty>
        <AppBodySty>
          <ScrollElementSty className='scrollElement'>
            <Outlet />
          </ScrollElementSty>
        </AppBodySty>
      </AppFrameSty>
    </>
  )
}
export default App
